From: Keir Fraser Date: Thu, 11 Dec 2008 13:26:02 +0000 (+0000) Subject: hvmloader: enable bus mastering of PCI device X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14026^2~30 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=20553adcd9157010e708488b8b74af8cc135096a;p=xen.git hvmloader: enable bus mastering of PCI device Without this, init routine in some PCI option ROM doesn't work well. Signed-off-by: Kouya Shimura --- diff --git a/tools/firmware/hvmloader/hvmloader.c b/tools/firmware/hvmloader/hvmloader.c index bff548f9f2..9723306f8e 100644 --- a/tools/firmware/hvmloader/hvmloader.c +++ b/tools/firmware/hvmloader/hvmloader.c @@ -269,6 +269,11 @@ static void pci_setup(void) printf("pci dev %02x:%x INT%c->IRQ%u\n", devfn>>3, devfn&7, 'A'+pin-1, isa_irq); } + + /* Enable bus mastering. */ + cmd = pci_readw(devfn, PCI_COMMAND); + cmd |= PCI_COMMAND_MASTER; + pci_writew(devfn, PCI_COMMAND, cmd); } /* Assign iomem and ioport resources in descending order of size. */